package com.briup.day20;

public class Test_Priority {
    public static void main(String[] args) {
        Thread t1=new Thread(){
            public void run(){
                for(int i=0;i<=1000000;i++){
                    if(i%5000==0){
                        System.out.println("子线程1: "+i);
                    }
                }
            }
        };
        Thread t2=new Thread(){
            public void run(){
                for(int i=0;i<=1000000;i++){
                    if(i%5000==0){
                        System.out.println("子线程2: "+i);
                    }
                }
            }

        };
        t1.setPriority(Thread.MIN_PRIORITY);
        t2.setPriority(Thread.MAX_PRIORITY);
        t1.start();
        t2.start();
    }
}
